home *** CD-ROM | disk | FTP | other *** search
/ BBS in a Box 7 / BBS in a Box - Macintosh - Volume VII (BBS in a Box) (January 1993).iso / Files / Hyper / S-Sh / SD Gradebook.cpt / SuperDuper Gradebook 1.25 / card_16011.txt < prev    next >
Text File  |  1988-07-21  |  5KB  |  218 lines

  1. -- card: 16011 from stack: in.25
  2. -- bmap block id: 17280
  3. -- flags: 4000
  4. -- background id: 2780
  5. -- name: Student Directory
  6. ----- HyperTalk script -----
  7. on opencard
  8.   set the scroll of card field "directory" to 0
  9. end opencard
  10.  
  11.  
  12. -- part 1 (field)
  13. -- low flags: 01
  14. -- high flags: 0007
  15. -- rect: left=18 top=62 right=320 bottom=344
  16. -- title width / last selected line: 0
  17. -- icon id / first selected line: 0 / 0
  18. -- text alignment: 0
  19. -- font id: 4
  20. -- text size: 9
  21. -- style flags: 0
  22. -- line height: 12
  23. -- part name: Directory
  24. ----- HyperTalk script -----
  25. on mousedown
  26.   global cardOffset
  27.   set the locktext of me to false
  28.   click at the clickloc
  29.   click at the clickloc
  30.   set the locktext of me to true
  31.   put clickline()+cardOffset into cardnum
  32.   visual effect venetian blinds fast
  33.   go to card cardnum
  34. end mousedown
  35.  
  36. function Clickline
  37. return((scroll of the target + (item 2 of the clickloc - item 2 of the rect of the target)) div the textheight of the target)+1
  38. end Clickline
  39.  
  40.  
  41. -- part 2 (button)
  42. -- low flags: 00
  43. -- high flags: A003
  44. -- rect: left=352 top=269 right=292 bottom=480
  45. -- title width / last selected line: 0
  46. -- icon id / first selected line: 0 / 0
  47. -- text alignment: 1
  48. -- font id: 0
  49. -- text size: 12
  50. -- style flags: 0
  51. -- line height: 16
  52. -- part name: Refresh Directory
  53. ----- HyperTalk script -----
  54. on mouseUp
  55.   answer "Include students who withdrew?" with "yes" or "no" or "Cancel"
  56.   if it is "yes" then
  57.     put true into dodrop
  58.   else if it is "no" then
  59.     put false into dodrop
  60.   else
  61.     exit mouseup
  62.   end if
  63.   global cardOffset
  64.   put empty into card field "directory"
  65.   set the lockscreen to true
  66.   push card
  67.   go card "first record"
  68.   get the number of this card
  69.   put it into start
  70.   get the number of last card
  71.   put it into finish
  72.   put empty into stringhold
  73.   pop card
  74.   set the lockscreen to false
  75.   repeat with count = start to finish
  76.     push card
  77.     set the lockscreen to true
  78.     go card count
  79.     if (bkgnd field "withdrew" is empty) or (dodrop) then
  80.       get field "last name"
  81.       put sixteentab(it) into stringhold
  82.       get field "first name"
  83.       put stringhold&&twelvetab(it)into stringhold
  84.       get field "SS number"
  85.       put stringhold&&it into stringhold
  86.       if bkgnd field "withdrew" is not empty then
  87.         put stringhold&&"w" into stringhold
  88.       end if
  89.       put count-cardOffset into lineNumber
  90.       pop card
  91.       set the lockscreen to false
  92.       put stringhold into line lineNumber of card field "Directory"
  93.     else
  94.       pop card
  95.       set the lockscreen to false
  96.     end if
  97.   end repeat
  98.   beep
  99. end mouseUp
  100.  
  101.  
  102. function sixteentab instring
  103. get the length of instring
  104. put it into howlong
  105. put 16-howlong into spacer
  106. repeat with count=1 to spacer
  107.   put space after instring
  108. end repeat
  109. return instring
  110. end sixteentab
  111.  
  112. function twelvetab instring
  113. get the length of instring
  114. put it into howlong
  115. put 12-howlong into spacer
  116. repeat with count=1 to spacer
  117.   put space after instring
  118. end repeat
  119. return instring
  120. end twelvetab
  121.  
  122.  
  123.  
  124.  
  125. -- part 3 (button)
  126. -- low flags: 00
  127. -- high flags: A003
  128. -- rect: left=355 top=297 right=319 bottom=477
  129. -- title width / last selected line: 0
  130. -- icon id / first selected line: 0 / 0
  131. -- text alignment: 1
  132. -- font id: 0
  133. -- text size: 12
  134. -- style flags: 0
  135. -- line height: 16
  136. -- part name: Clear Directory
  137. ----- HyperTalk script -----
  138. on mouseUp
  139.   answer "This will erase the directory" with "Cancel" or "OK"
  140.   if it is "OK" then
  141.     put empty into card field "directory"
  142.     put "Click REFRESH Button To Build A New Directory" into line 3 of card field "directory"
  143.   end if
  144. end mouseUp
  145.  
  146.  
  147.  
  148. -- part 5 (button)
  149. -- low flags: 00
  150. -- high flags: A003
  151. -- rect: left=360 top=35 right=57 bottom=460
  152. -- title width / last selected line: 0
  153. -- icon id / first selected line: 0 / 0
  154. -- text alignment: 1
  155. -- font id: 0
  156. -- text size: 12
  157. -- style flags: 0
  158. -- line height: 16
  159. -- part name: to Records
  160. ----- HyperTalk script -----
  161. on mouseUp
  162.   visual effect dissolve
  163.   go card "first record"
  164. end mouseUp
  165.  
  166.  
  167.  
  168. -- part 6 (button)
  169. -- low flags: 00
  170. -- high flags: A003
  171. -- rect: left=430 top=166 right=185 bottom=478
  172. -- title width / last selected line: 0
  173. -- icon id / first selected line: 0 / 0
  174. -- text alignment: 1
  175. -- font id: 0
  176. -- text size: 12
  177. -- style flags: 0
  178. -- line height: 16
  179. -- part name: help
  180. ----- HyperTalk script -----
  181. on mouseUp
  182.   set visible of card field "help" to not the visible of card field "help"
  183. end mouseUp
  184.  
  185.  
  186.  
  187. -- part 7 (field)
  188. -- low flags: 81
  189. -- high flags: 2004
  190. -- rect: left=21 top=65 right=291 bottom=323
  191. -- title width / last selected line: 0
  192. -- icon id / first selected line: 0 / 0
  193. -- text alignment: 0
  194. -- font id: 3
  195. -- text size: 9
  196. -- style flags: 0
  197. -- line height: 12
  198. -- part name: help
  199. ----- HyperTalk script -----
  200. on mouseup
  201.   hide card field "help"
  202. end mouseup
  203.  
  204.  
  205.  
  206. -- part contents for card part 7
  207. ----- text -----
  208.  
  209.  
  210. The "Refresh Directory" button will delete the old directory and construct a new one using current information from the Student Records section of the Gradebook.
  211.  
  212. Once the directory is constructed, clicking on an entry will take you directly to that student's record card.
  213.  
  214. The "Clear Directory" button will delete all data from the directory, leaving it blank.
  215.  
  216. The "To Records" button returns you to the Student Records section of the Gradebook.
  217.  
  218.